
Component({
  properties: {
    tabs: {
      type: Array,
      value: []
    }
  },

  data: {
    activeIndex: 0
  },

  methods: {
    handleTabChange(e) {
      let { index } = e.currentTarget.dataset;
      this.setData({ activeIndex: index });
      this.triggerEvent('change', index);
    },
  }
})